<template>
    <div id='overlay' @click='close'>
        <img class="img" :src='imgsource.url' alt='' />
        
    </div>
</template>

<script>
    export default{
        props: {
            imgsource: Object,
            close: Function
        },
        data(){
            return{

            }
        },
        mounted: function() {
            // var overlay = document.getElementById('overlay');
            // overlay.setAttribute('style', 'height:' + window.innerHeight + 'px; ' + 'width:' + window.innerWidth + 'px');
            // console.log(window.innerWidth);
        }
    }
</script>
<style scoped>
.img{
    width: 100%;
    height: auto;
}
</style>
